<template>
    <div>
        <h1>test testGet</h1>
        <input type="text" v-model="stu_id">
        <button @click="TestParams">测试get请求的params参数</button>
    </div>
</template>

<script>
import {TestGet} from "../api/ajax";
export default {
    data(){
        return{
            result:[],
            stu_id:""
        };
    },
    async mounted(){
        console.log(TestGet);
        let url = "/search_info_item";
        let params = {stu_id:"008"};
        let data = await TestGet(url,params);
        console.log(data);
        this.result = data.data;
        console.log(this.result);
    },
    methods:{
        async TestParams(){
            let url = `/search_entry/${this.stu_id}`;
            const params = {};
            let result = await TestGet(url,params);
            console.log(result);
        }
    }
}
</script>

<style lang="scss" scoped>

</style>